package zjitc.link;

import java.util.Arrays;

public class MatTest {
    public static void main(String[] args) {
        int[][] arr1={{3,6,9},{6,5,1}};
        int[][] arr2={{6,3},{8,9},{4,3}};

        int[][] arr3=new int[arr1.length][arr2[0].length];

        for (int i=0;i<arr1.length;i++){
            for (int j=0;j<arr2[0].length;j++){
                int sum =0;
                for (int k=0;k<arr1[0].length;k++){
                    sum=sum+arr1[i][k]*arr2[k][j];
                    arr3[i][j]=sum;
                }
            }

        }
        for (int i=0;i<arr3.length;i++){
            System.out.println(Arrays.toString(arr3[i]));
        }
    }
}
